package edu.stanford.bmir.protege.web.client.ui.ontology.scene;

import com.google.gwt.core.client.GWT;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.uibinder.client.UiHandler;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.Widget;

import edu.stanford.bmir.protege.web.client.project.Project;
import edu.stanford.bmir.protege.web.client.ui.ontology.external.STKOSOntologySearch;
import edu.stanford.bmir.protege.web.client.ui.ontology.external.evaluation.STKOSOntologyEvaluation;
import edu.stanford.bmir.protege.web.client.ui.ontology.external.query.STKOSOntologyInference;
import edu.stanford.bmir.protege.web.client.ui.ontology.external.radon.STKOSOntologyDiagnose;
import edu.stanford.bmir.protege.web.client.ui.ontology.stkos.cutter.StkosCutterTab;
import edu.stanford.bmir.protege.web.client.ui.ontology.stkos.enricher.StkosEnricherTab;
import edu.stanford.bmir.protege.web.client.ui.ontology.stkos.mapper.StkosMapperTab;
import edu.stanford.bmir.protege.web.client.ui.ontology.stkos.merger.StkosMergerTab;
import edu.stanford.bmir.protege.web.client.ui.ontology.stkos.visualizer.StkosVisualizerTab;

public class SeceneThree extends BaseScene {

	private static SeceneThreeUiBinder uiBinder = GWT
			.create(SeceneThreeUiBinder.class);

	interface SeceneThreeUiBinder extends UiBinder<Widget, SeceneThree> {
	}
	
	@UiField Button menu_1_1;
	@UiField Button menu_1_2;
	@UiField Button menu_1_3;
	@UiField Button menu_1_4;
	
	@UiField Button menu_3_1;
	@UiField Button menu_3_2;
	@UiField Button menu_3_3;
	
	@UiField Button menu_4_1;
	@UiField Button menu_4_2;
	@UiField Button menu_4_3;
	@UiField Button menu_4_4;
	
	//本体裁切工具
	@UiHandler("menu_1_1")
	void onMenu_1_1Click(ClickEvent event) {
		createTab( StkosCutterTab.class.getName() );
	}
	//本体匹配工具
	@UiHandler("menu_1_2")
	void onMenu_1_2Click(ClickEvent event) {
		createTab( StkosMapperTab.class.getName() );
	}
	//本体裁切工具
	@UiHandler("menu_1_3")
	void onMenu_1_3Click(ClickEvent event) {
		createTab( StkosCutterTab.class.getName() );
	}
	//本体合并工具
	@UiHandler("menu_1_4")
	void onMenu_1_4Click(ClickEvent event) {
		createTab( StkosMergerTab.class.getName() );
	}
	
	//本体搜索与获取工具
	@UiHandler("menu_3_1")
	void onMenu_3_1Click(ClickEvent event) {
		addPortlet( STKOSOntologySearch.class.getName() );
	}
	//本体实例扩充工具
	@UiHandler("menu_3_2")
	void onMenu_3_2Click(ClickEvent event) {
		addPortlet( "" );
	}
	//本体语义丰富工具
	@UiHandler("menu_3_3")
	void onMenu_3_3Click(ClickEvent event) {
		createTab( StkosEnricherTab.class.getName() );
	}
	
	//本体推理工具
	@UiHandler("menu_4_1")
	void onMenu_4_1Click(ClickEvent event) {
		addPortlet( STKOSOntologyInference.class.getName() );
		
	}
	//本体诊断工具
	@UiHandler("menu_4_2")
	void onMenu_4_2Click(ClickEvent event) {
		addPortlet( STKOSOntologyEvaluation.class.getName() );
	}
	//本体评估工具
	@UiHandler("menu_4_3")
	void onMenu_4_3Click(ClickEvent event) {
		addPortlet( STKOSOntologyDiagnose.class.getName() );
	}
	//本体可视化工具
	@UiHandler("menu_4_4")
	void onMenu_4_4Click(ClickEvent event) {
		createTab(StkosVisualizerTab.class.getName());
	}
	
	public SeceneThree( Project project ) {
		super(project);
		initWidget(uiBinder.createAndBindUi(this));
	}
	
	/*//本体裁切工具
	@UiHandler("menu_1_1")
	void onMenu_1_1Click(ClickEvent event) {
		//ProjectDisplayImpl psp = ProjectCache.maps.get( project.getProjectId() );
		createTab( StkosCutterTab.class.getName() );
		//MessageBox.alert("请在上方选择裁切工具tab进行操作");
	}
	//本体匹配工具
	@UiHandler("menu_1_2")
	void onMenu_1_2Click(ClickEvent event) {
		//ProjectDisplayImpl psp = ProjectCache.maps.get( project.getProjectId() );
		createTab( StkosMapperTab.class.getName() );
		//MessageBox.alert("请在上方选择匹配工具tab进行操作");
	}
	//本体裁切工具
	@UiHandler("menu_1_3")
	void onMenu_1_3Click(ClickEvent event) {
		//ProjectDisplayImpl psp = ProjectCache.maps.get( project.getProjectId() );
		createTab( StkosCutterTab.class.getName() );
		//MessageBox.alert("请在上方选择裁切工具tab进行操作");
	}
	//本体合并工具
	@UiHandler("menu_1_4")
	void onMenu_1_4Click(ClickEvent event) {
		//ProjectDisplayImpl psp = ProjectCache.maps.get( project.getProjectId() );
		createTab( StkosMergerTab.class.getName() );
		//MessageBox.alert("请在上方选择合并工具tab进行操作");
	}
	
	
	//SKOS本体协作平台按钮
	@UiHandler("menu_2")
	void onMenu_2Click(ClickEvent event) {
		addPortlet( "" );
	}
	
	//本体搜索与获取工具
	@UiHandler("menu_3_1")
	void onMenu_3_1Click(ClickEvent event) {
		addPortlet( STKOSOntologySearch.class.getName() );
	}
	//本体实例扩充工具
	@UiHandler("menu_3_2")
	void onMenu_3_2Click(ClickEvent event) {
		addPortlet( "" );
	}
	//本体语义丰富工具
	@UiHandler("menu_3_3")
	void onMenu_3_3Click(ClickEvent event) {
		//ProjectDisplayImpl psp = ProjectCache.maps.get( project.getProjectId() );
		createTab( StkosEnricherTab.class.getName() );
		//addPortlet( "" );
		//MessageBox.alert("请在上方选择丰富工具tab进行操作");
	}
	
	//本体推理工具
	@UiHandler("menu_4_1")
	void onMenu_4_1Click(ClickEvent event) {
		addPortlet( STKOSOntologyInference.class.getName() );
		
	}
	//本体评估工具
	@UiHandler("menu_4_2")
	void onMenu_4_2Click(ClickEvent event) {
		addPortlet( STKOSOntologyEvaluation.class.getName() );
		
	}
	//本体评估工具
	@UiHandler("menu_4_2_1")
	void onMenu_4_2_1Click(ClickEvent event) {
		//addPortlet( STKOSOntologyDiagnose.class.getName() );
	}
	//本体评估工具
	@UiHandler("menu_4_2_2")
	void onMenu_4_2_2Click(ClickEvent event) {
		addPortlet( STKOSOntologyEvaluation.class.getName() );
	}
	//本体可视化工具
	@UiHandler("menu_4_3")
	void onMenu_4_3Click(ClickEvent event) {
		//ProjectDisplayImpl psp = ProjectCache.maps.get( project.getProjectId() );
		createTab(StkosVisualizerTab.class.getName());
		//MessageBox.alert("请在上方选择可视化工具tab进行操作");
	}*/

}
